function create_updated_collection(collection_a, object_b) {
  //在这里写入代码
  let collectionC=[],collectionD=[];
  
   for(let i of collection_a)
   {
     if(!collectionC[i])
         {
           collectionC[i]={};
           collectionC[i].key=i;
           collectionC[i].count=1;
         }
         else
         collectionC[i].count++;
   }
        //console.log(collectionC);
    
     for(let m in  collectionC){
       //console.log(m)
     for(let j of object_b.value)
     {//console.log(m.key);
     if(collectionC[m].key==j)
     collectionC[m].count=collectionC[m].count-(Math.floor((collectionC[m].count/3)));
     
   }
 }//console.log(collectionC);
 let result=[];
 for(let k in collectionC)
 //console.log(collectionC);
 //console.log(collectionC.k);属性
 //console.log(collectionC[k]);属性值
 result.push(collectionC[k]);
 
 
 
 
 return result;  
}

module.exports = create_updated_collection;
